package com.xpandaframework.sys.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.xpandaframework.base.controller.BaseController;
import org.xpandaframework.base.service.BaseService;

import com.xpandaframework.sys.entity.SysUser;
import com.xpandaframework.sys.service.SysUserService;

@Controller
@RequestMapping("/sys/sysUser")
public class SysUserController extends BaseController<SysUser> {

  @Autowired
  private SysUserService sysUserService;

  @Override
  protected BaseService<SysUser> getBaseService() {
    return this.sysUserService;
  }

  @RequestMapping(value = { "/addUser" }, method = { RequestMethod.GET })
  public String addUser() {
    System.out.println("###############");
    return "index";
  }

  @ResponseBody
  @RequestMapping(value = { "/searchUser" }, method = { RequestMethod.GET })
  public SysUser searchUser() {
    final SysUser u = new SysUser();
    return u;
  }

}
